<?php
// +----------------------------------------------------------------------
// | ZZYY  [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2023 https://www.fastadmin.net All rights reserved.
// +----------------------------------------------------------------------
// | Author: yourname
// +----------------------------------------------------------------------

namespace app\admin\model\zzyy;

use think\Model;


class ZzyyThird extends Model
{
    const PLATFORM_MP_WEIXIN = 'mp_weixin';
    const PLATFORM_H5_WEIXIN = 'h5_weixin';
    const PLATFORM_TONGTONGSUO = 'tongtongsuo';   // 通通锁

    // 表名
    protected $name = 'zzyy_third';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'integer';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';
    protected $deleteTime = false;

    // 追加属性
    protected $append = [

    ];

    static public function isTongTongSuoUser($userId)
    {
        $res = self::where('user_id', $userId)->where('platform', self::PLATFORM_TONGTONGSUO)->find();
        if ($res) {
            return true;
        } else {
            return false;
        }
    }

}